// +----------------------------------------------------------------------
// | Project:   Android-Commons  
// +----------------------------------------------------------------------
// | CreateTime: 15/12/14  下午1:33
// +----------------------------------------------------------------------
// | Author:     xab(xab@xabad.cn)
// +----------------------------------------------------------------------
// | Description:
// +----------------------------------------------------------------------
package cn.xabad.commons.sample.http;

import cn.xabad.commons.sample.model.StudentInfo;
import cn.xabad.commons.sample.tools.Config;
import retrofit.Call;
import retrofit.http.Field;
import retrofit.http.FormUrlEncoded;
import retrofit.http.GET;
import retrofit.http.Headers;
import retrofit.http.POST;
import retrofit.http.Query;

/**
 * DESC   :
 * AUTHOR : Xabad
 */
public interface IHttpLogin {

    /**
     * 注册接口 头像地址可以为空
     */
    @POST("/signup")
    @FormUrlEncoded
    @Headers(Config.HEADER_BOXFISH)
    Call<String> regist(@Field("username") String username, @Field("nickname") String nickname,
                        @Field("password") String password, @Field("figure_url") String figureUrl);

    @POST("/login")
    @FormUrlEncoded
    @Headers(Config.HEADER_BOXFISH)
    Call<String> login(@Field("username") String username, @Field("password") String password);

    @GET("/user/me")
    @Headers(Config.HEADER_BOXFISH)
    Call<StudentInfo> getStudentInfo(@Query("access_token") String access_token);

}
